{{extend 'layout.html'}}

<div class="module">
	<div class="module-body">	
		<div class="btn-box-row row-fluid">										
			<div class="span2" ></div>
			<div class="span10" >				
				<a class="btn-box small span2" href={{=URL('impostazioni', 'nuovacategoriasfida')}}>
					<i class="icon-plus"></i>
					<b>Aggiungi nuova</b>
				</a>
				<a class="btn-box small span2" href={{=URL('impostazioni', 'modificalivelli')}}>
					<i class="icon-th-list"></i>
					<b>Livelli</b>
				</a>
			</div>
		</div>
		<div class="stream-list">									
			{{for row in rows:}}
				<div class="media stream">
					<a class="media-avatar medium pull-left" href="#">
						<img src="{{=URL('default', 'download', args=row.thumbnail)}}" />
					</a>
					<div class="media-body">
						<div class="stream-headline">
							<h5 class="stream-author">
								{{=row.categoria_test}} 									
							</h5>		
							<div class="stream-text">
								{{=XML(row.descrizione)}}
							</div>
						</div>							
						<div class="stream-options">
							<a class="btn btn-small" href={{=URL('impostazioni', 'modificacategoriatest', vars={'categoria_test_id':row["id"]})}}>
								<i class="icon-cog shaded"></i>
								{{=T('Modifica')}}
							</a>
							<button class="btn btn-small" onclick="if (confirm('Sei sicuro?')){ajax('{{=URL('impostazioni', 'eliminacategoriatest', vars={'categoria_test_id':row['id']})}}',[], null);jQuery(this).parent().parent().parent().hide();}">
								<i class="icon-remove-circle shaded"></i>
								{{=T('Elimina')}}
							</button>
						</div>
					</div>
				</div>
			{{pass}}
		</div>
	</div>
</div>